package org.cmg.study.spring;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author CMG
 * @version 1.0
 * @cLassName MainApp3
 * @description
 * @date 2021/8/31 16:34
 **/
public class MainApp3 {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
        HelloWorld objA = (HelloWorld) context.getBean("helloWorld");
        objA.getMessage();
        objA.getMessage1();
        objA.getMessage2();
        System.out.println("============================");
        HelloChina objB = (HelloChina) context.getBean("helloChina");
        objB.getMessage();
        objB.getMessage1();
        objB.getMessage2();
    }
}
